/**
 * Audit the request from clients
 */
var toolUtil = require('../common/utils/toolUtil');
var Audits = mongoose.model('backoffice_audits');

exports.doSetResHead = function (req, res, next) {

    res.header("Access-Control-Allow-Origin", "*");
    res.header("Access-Control-Allow-Methods", "*");
    res.header("Access-Control-Max-Age", 60);
    res.header("Access-Control-Allow-Headers", "X-Requested-With,Content-type,Accept");
    if ('OPTIONS' == req.method) {
        res.send(200);
    } else {
        next();
    }
}